

let express = require('./express');
app = express();

app.use(function (req, res, next) {
  console.log('middleware1');
  next();
});
// app.use('/api',function (req, res, next) {
//
// });

app.get('/user/:id/:name',function (req, res) {
  res.end(JSON.stringify(req.params))
})
app.use(function (err,req, res, next) {
  console.log(err);
  next();
});

app.listen(3000,()=>{
  console.log(`start 3000.`)
});
